<template>
  <a-card size="small" :bordered="false" :hoverable="true">
    <a-tabs v-model:activeKey="activeKey" destroyInactiveTabPane="true">
      <a-tab-pane key="1" tab="待处理">
      <TodoList :activeKey = "1"></TodoList>
      </a-tab-pane>
      <a-tab-pane key="2" tab="处理中" >
      <DoingList :activeKey = "2" ></DoingList>
      </a-tab-pane>
      <a-tab-pane key="4" tab="已完成">
      <CompleteList :activeKey = "4"></CompleteList>
      </a-tab-pane>

    </a-tabs>
  </a-card>
</template>

<script setup>
import {onMounted, ref} from "vue";
import TodoList from './arlist1.vue'
import DoingList from './arlist2.vue'
import CompleteList from './arlist3.vue'

import {useRoute} from "vue-router";

import {smartSentry} from "/@/lib/smart-sentry";

const route = useRoute();
let activeKey = ref("1");

onMounted(refreshActiveKey);
async function refreshActiveKey() {
  if(typeof route.query.TabactiveKey != "undefined") {
    if (route.query.TabactiveKey != "") {
      activeKey.value = route.query.TabactiveKey;
      route.query.TabactiveKey = "";
    }
  }
}
</script>

<style scoped>

</style>
